{% extends "admin/base.html" %}
{% block title %}-用户管理{% endblock %}
{% block user %}current-item{% endblock %}
{% block mainbody %}
    <div class="main">
        <center>
            <h1>用户管理</h1>
            <br>
            <h3><a href="/admin/user_add">添加用户</a></h3>
            <br>

            <table class="table-user" border="1">
                <tr>
                    <td>id</td>
                    <td>用户名</td>
                    <td>性别</td>
                    <td>出生日期</td>
                    <td>手机号</td>
                    <td>用户名</td>
                    <td>密码</td>
                    <td>管理员</td>
                    <td>职位</td>
                    <td>操作</td>
                    <td>操作</td>
                </tr>
                {% for item in data %}
                    <tr>
                        <td>{{item.pk}}</td>
                        <td>{{item.fields.user_name}}</td>
                        <td>{{item.fields.user_sex}}</td>
                        <td>{{item.fields.user_birth}}</td>
                        <td>{{item.fields.user_phone}}</td>
                        <td>{{item.fields.user_nick}}</td>
                        <td>{{item.fields.user_pwd}}</td>
                        <td>{{item.fields.is_admin}}</td>
                        <td>{{item.fields.position}}</td>
                        <td><a href="/admin/user_update?user_id={{ item.pk }}">编辑</a></td>
                        <td><a href="/admin/user_delete?user_id={{ item.pk }}">删除</a></td>
                    </tr>
                {% endfor %}
            </table>

        </center>
    </div>
{% endblock %}
